<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<form:form modelAttribute="page" id="pagerForm" method="post"
           action="${ctx}/role/lookup?navtabid=userNav">
    <input type="hidden" name="pageNo" value="1"/>
    <input type="hidden" id="pageSize" name="pageSize" value="${page.pageSize}"/>
    <input type="hidden" name="orderBy" value="${page.orderBy}"/>
    <input type="hidden" name="order" value="${page.order}"/>
</form:form>

<div class="pageHeader">
    <form rel="pagerForm" method="post" action="role/lookup" onsubmit="return dwzSearch(this, 'dialog');">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>部门名称:</label>
                    <input class="textInput" name="orgName" value="" type="text">
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">查询</button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="button">
                            <div class="buttonContent">
                                <button type="button" multLookup="roleId" warn="请选择角色">选择带回</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">

    <table class="table" layoutH="118" targetType="dialog" width="100%">
        <thead>
        <tr>
            <th width="40"><input type="checkbox" class="checkboxCtrl"
                                  group="roleId"/></th>
            <th orderField="name"
                class=" ${page.orderBy eq 'name' ? page.order : '' }">name
            </th>
            <th orderField="show_name"
                class=" ${page.orderBy eq 'show_name' ? page.order : '' }">角色名称
            </th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="item" items="${page.result}" varStatus="menu">
            <tr>
                <td><input type="checkbox" name="roleId" value="{id:'${item.id}',showname:'${item.showName}'}"/></td>
                <td><c:out value='${item.name}'/></td>
                <td><c:out value='${item.showName}'/></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <%@ include file="/commons/panelBar.jsp" %>
</div>
